import 'package:flutter/material.dart';
import 'package:niu_app/configs/app_style_config.dart';
import 'package:niu_app/pages/model/homepage/team_model.dart';
import 'package:niu_app/views/jk/jk_text.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
class team1widget extends StatelessWidget {
  final teammodel datamodel;

  const team1widget({Key key, this.datamodel}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Column(
      children: [
        bottom(),
        Divider(color: AppStyleConfig.color1.withOpacity(0.6),)
      ],
    );
  }
  Widget bottom(){
    return  Container(
      padding: EdgeInsets.fromLTRB(17,10,17,10),
      child: Column(
        children: [
          SizedBox(height: 26.w,),
          Row(
            mainAxisAlignment: MainAxisAlignment.spaceBetween,
            children: [
              Row(
                children: [
                  Column(
                    children: [
                      Image.asset("${datamodel.url}",height: 40.w,width: 40.w,),
                    ],
                  ),
                  SizedBox(width: 5,),
                  Column(
                    crossAxisAlignment: CrossAxisAlignment.start,
                    children: [
                      JKText(
                        data: "${datamodel.title1}",
                        fontSize: 12.w,
                        weight: FontWeight.bold,
                      ),
                      SizedBox(height: 9.w,),
                      Row(
                        children: [
                          JKText(
                            data: "${datamodel.time1}",
                            fontSize: 10.w,
                            color: AppStyleConfig.color2,
                          ),
                          SizedBox(width: 5.w,),
                          JKText(
                            data: "${datamodel.time2}",
                            fontSize: 10.w,
                            color: AppStyleConfig.color2,
                          )
                        ],
                      )
                    ],
                  )
                ],
              ),
              Row(
                children: [
                  Column(
                    crossAxisAlignment: CrossAxisAlignment.end,
                    children: [
                      Row(
                        children: [
                          Container(
                              height: 18.w,
                              width: 38.w,
                              color: AppStyleConfig.color1.withOpacity(0.4),
                              child: Center(
                                child: JKText(data: "${datamodel.title2}",fontSize: 12.w,color: AppStyleConfig.background,),
                              )
                          ),
                          SizedBox(width: 5.w,),
                          Container(
                              height: 18.w,
                              width: 38.w,
                              color: AppStyleConfig.color1.withOpacity(0.4),
                              child: Center(
                                child: JKText(data: "${datamodel.title3}",fontSize: 12.w,color: AppStyleConfig.background,),
                              )
                          ),
                        ],
                      ),
                      SizedBox(height: 5.w,),
                      title4(datamodel.color)
                    ],
                  ),
                ],
              ),
            ],
          ),
          SizedBox(height: 18.w,),
          Row(
            mainAxisAlignment: MainAxisAlignment.spaceAround,
            children: [
              Column(
                children: [
                  JKText(
                    data: "${datamodel.number1}",
                    fontSize: 14.w,
                    color: AppStyleConfig.color3,
                  ),
                  JKText(
                    data: "收益分成",
                    fontSize: 10.w,
                    color: AppStyleConfig.color2,
                  ),
                ],
              ),
              Column(
                children: [
                  JKText(
                    data: "${datamodel.number2}",
                    fontSize: 14.w,
                    color: AppStyleConfig.color3,
                  ),
                  JKText(
                    data: "今日跟单",
                    fontSize: 10.w,
                    color: AppStyleConfig.color2,
                  ),
                ],
              ),
              Column(
                children: [
                  JKText(
                    data: "${datamodel.number3}",
                    fontSize: 14.w,
                    color: AppStyleConfig.color3,
                  ),
                  JKText(
                    data: "累计跟单",
                    fontSize: 10.w,
                    color: AppStyleConfig.color2,
                  ),
                ],
              ),
            ],
          )
        ],
      ),
    );
  }
  Widget title4(Color color){
    return Container(
        height: 18.w,
        width: 36.w,
        color: color,
        child: Center(
          child: JKText(data: "${datamodel.title4}",fontSize: 12.w,color: AppStyleConfig.TextColor,),
        )
    );
  }
}
